import request from '@/utils/request'

// 查询光缆列表
export function listCable(query) {
  return request({
    url: '/cable/list',
    method: 'post',
    data: query
  })
}

// 查询光缆详细
export function getCable(id) {
  return request({
    url: '/cable/' + id,
    method: 'get'
  })
}

// 新增光缆
export function addCable(data) {
  return request({
    url: '/cable',
    method: 'post',
    data: data
  })
}

// 修改光缆
export function updateCable(data) {
  return request({
    url: '/cable',
    method: 'post',
    data: data
  })
}

// 删除光缆
export function delCable(id) {
  return request({
    url: '/cable/' + id,
    method: 'delete'
  })
}

// 导出光缆
export function exportCable(query) {
  return request({
    url: '/cable/export',
    method: 'get',
    params: query
  })
}


// 下载机柜导入模板
export function importTemplate() {
  return request({
    url: '/cable/importTemplate',
    method: 'get'
  })
}
